Integrating with Bubble

Help Center

Bubble homepage

Bubble lets you integrate with DocuGenerate to add PDF generation to your apps. With our plugin, you can set up custom templates and generate professional documents directly within your workflows.

Summary

1. Install the Plugin
2. List Templates (Data)
3. Get Template (Data)
4. List Documents (Data)
5. Get Document (Data)
6. Create Template (Action)
7. Update Template (Action)
8. Delete Template (Action)
9. Generate Document (Action)
10. Update Document (Action)
11. Delete Document (Action)

1. Install the Plugin

To get started, install the DocuGenerate plugin and configure it with your API key. In your Bubble editor, navigate to the Plugins tab, search for DocuGenerate, and install the plugin.

Install the DocuGenerate API Key in Bubble

Go to your DocuGenerate account settings to obtain your API Key and enter it in the plugin’s settings within Bubble to enable secure access.

Configure the DocuGenerate API Key in Bubble

Once connected, you’ll be able to use a variety of actions and data calls to manage templates and generate documents.

2. List Templates (Data)

Use this call to retrieve a list of all templates stored in your DocuGenerate account, including basic details such as template names and IDs. This data call can be useful for displaying available templates in your Bubble app, allowing users to choose from preconfigured options.

List templates data call

3. Get Template (Data)

This call retrieves detailed information for a specific template, using the template’s unique ID. You can access attributes like the template’s name, tags, and format, which is helpful when displaying or managing individual templates within your app. This call requires the following input:

  • id (Template ID): Required to specify which template to retrieve.

Get template data call

4. List Documents (Data)

Fetches a list of documents generated from a specific template, allowing you to track or display previously generated documents related to a template. This call can provide information like document name, format, and creation date for easy access and management. It requires the following input:

  • template_id (Template ID): Required to specify the template for which to list documents.

List documents data call

5. Get Document (Data)

This call retrieves metadata for a specific document, such as its filename, format, and document URI. Use this data call to access details about individual documents and manage them within your app. The call requires the following input:

  • id (Document ID): Required to specify which document to retrieve.

Get document data call

6. Create Template (Action)

Upload a new file as a template to your DocuGenerate account. This action also allows you to specify an optional name for the template. Once uploaded, this template can be used to generate documents based on user data. The following inputs are expected:

  • file (File upload): Required; upload the .docx file to use as a template.
  • name (Text): Optional; specify a name for the new template.

Create template action

7. Update Template (Action)

Modify an existing template’s file or update its name. This action allows you to keep templates current by uploading new versions or adjusting names as needed. The following inputs are required:

  • id (Template ID): Required to specify the template to update.
  • file (File upload): Optional; upload a new file if updating the template content.
  • name (Text): Optional; update the template name.

Update template action

8. Delete Template (Action)

Remove a template from your DocuGenerate account. This action is useful for maintaining a streamlined list of templates by removing any that are no longer needed. It requires the following input:

  • id (Template ID): Required to specify the template to delete.

Delete template action

9. Generate Document (Action)

This action creates a document from a specified template and dataset. Define the document’s name, filename, and format, and provide the data to populate fields in the template. This is essential for generating customized documents based on user input or data. The following inputs are customizable:

  • template_id (Template ID): Required to specify the template to use.
  • name (Text): Optional; assign a name to the generated document.
  • output_name (Text): Optional; define a custom filename for the output document.
  • output_format (Text): Optional; specify the output format (e.g., .pdf, .docx, .doc, .odt, .txt, .html, .png).
  • data (JSON): Required; data to populate fields in the template.

Generate document action

10. Update Document (Action)

Use this action to modify details of an existing document, such as updating the document’s name for improved organization or clarification. The following inputs are expected:

  • id (Document ID): Required to specify the document to update.
  • name (Text): Optional; change the document’s name.

Update document action

11. Delete Document (Action)

This action deletes a document from your DocuGenerate account. Use this to keep your document list clean and relevant by removing outdated or unnecessary documents. It requires the following input:

  • id (Document ID): Required to specify the document to delete.

Delete document action